PowerTCP Mail for .NET
GetChars(Byte[],Int32,Int32,Char[],Int32) Method




The byte array to decode.
The index of the first element in bytes to decode.
The number of elements to decode.
The character array where the decoded results are stored.
The index of the first element in chars to store decoded results.
Decodes a range of elements from a specified byte array, and stores them in a specified range of elements in a Unicode character array.
Syntax
Public Overloads Overrides Function GetChars( _
   ByVal bytes() As Byte, _
   ByVal byteIndex As Integer, _
   ByVal byteCount As Integer, _
   ByVal chars() As Char, _
   ByVal charIndex As Integer _
) As Integer
Dim instance As ImapUTF7
Dim bytes() As Byte
Dim byteIndex As Integer
Dim byteCount As Integer
Dim chars() As Char
Dim charIndex As Integer
Dim value As Integer
 
value = instance.GetChars(bytes, byteIndex, byteCount, chars, charIndex)
public override int GetChars( 
   byte[] bytes,
   int byteIndex,
   int byteCount,
   char[] chars,
   int charIndex
)
public: int GetChars( 
   byte[]* bytes,
   int byteIndex,
   int byteCount,
   char[]* chars,
   int charIndex
) override 
public:
int GetChars( 
   array<byte>^ bytes,
   int byteIndex,
   int byteCount,
   array<char>^ chars,
   int charIndex
) override 

Parameters

bytes
The byte array to decode.
byteIndex
The index of the first element in bytes to decode.
byteCount
The number of elements to decode.
chars
The character array where the decoded results are stored.
charIndex
The index of the first element in chars to store decoded results.

Return Value

The number of characters stored in chars.
Exceptions
ExceptionDescription
System.ArgumentNullExceptionbytes or chars is a null reference
System.ArgumentOutOfRangeException

byteIndex, byteCount, or charIndex is less than zero.

-or-

byteIndex plus byteCount is greater than the length of bytes.

-or-

charIndex is greater than the length of chars.

System.ArgumentExceptionbytes contains an invalid sequence of bytes
Remarks
Use GetCharCount(Byte[],Int32,Int32) to calculate exactly, or GetMaxCharCount to calculate at most, the array size required by GetChars(Byte[],Int32,Int32,Char[],Int32) to store decoded bytes.
See Also

Reference

ImapUTF7 Class
ImapUTF7 Members
Overload List


PowerTCP Mail for .NET Documentation Version 4.3
© 2018 Dart Communications. All Rights Reserved.
Send comments on this topic